<template>
    <fieldset>
        <legend>朋友</legend>
        <h1>小明</h1>
        <h1>小花</h1>
        <h1>小西</h1>
    </fieldset>
</template>

<script>
export default {
    props: ['id'],
    mounted() {
        console.log(this.$route.params)
        console.log(this.id)
    },
    //侦听路由参数的变化
    watch: {
        $route(newVal) {
            console.log(newVal)
        }
    }



}
</script>